<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.List, java.util.ArrayList, java.util.Map" %>
<%@ page import="com.xyrj.utils.HHString, com.xyrj.utils.HHTree" %>
<%
    String parent           = (String)request.getAttribute("parent");
    Map record              = (Map) request.getAttribute("record");
    List<Map> parentList    = (ArrayList<Map>)request.getAttribute("parentList");
    HHTree tree             = new HHTree (
        parentList,
        parent + "_id",
        "parent_id"
    );
    tree.setTplStr("<option value=\"%2$s\">%1$s</option>");
    tree.setReplaceFields(new String[] {parent + "_name", parent + "_id"});
%>
<p>
    <label>所属父类</label>
    <select name="parent_id" class="small-select" id="parent_id_id" cur="<%=HHString.objToString(record.get("parent_id")) %>">
        <option value="">请选择</option>
        <option value="-1">无</option>
        <%=tree.genTree() %>
    </select> 
    <br /><small>用户所属的类型，不同的类型具有不同的用户权限。</small>
</p>
